Optimal. Leaf size=53 \[ -\frac {a}{2 x^2}+\frac {1}{2} b d \cos (c) \text {Ci}\left (d x^2\right )-\frac {b \sin \left (c+d x^2\right )}{2 x^2}-\frac {1}{2} b d \sin (c) \text {Si}\left (d x^2\right ) \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.06, antiderivative size = 53, normalized size of antiderivative = 1.00, number of steps
used = 7, number of rules used = 6, integrand size = 16, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.375, Rules used = {14, 3460, 3378,
3384, 3380, 3383} \begin {gather*} -\frac {a}{2 x^2}+\frac {1}{2} b d \cos (c) \text {CosIntegral}\left (d x^2\right )-\frac {1}{2} b d \sin (c) \text {Si}\left (d x^2\right )-\frac {b \sin \left (c+d x^2\right )}{2 x^2} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 14
Rule 3378
Rule 3380
Rule 3383
Rule 3384
Rule 3460
Rubi steps
\begin {align*} \int \frac {a+b \sin \left (c+d x^2\right )}{x^3} \, dx &=\int \left (\frac {a}{x^3}+\frac {b \sin \left (c+d x^2\right )}{x^3}\right ) \, dx\\ &=-\frac {a}{2 x^2}+b \int \frac {\sin \left (c+d x^2\right )}{x^3} \, dx\\ &=-\frac {a}{2 x^2}+\frac {1}{2} b \text {Subst}\left (\int \frac {\sin (c+d x)}{x^2} \, dx,x,x^2\right )\\ &=-\frac {a}{2 x^2}-\frac {b \sin \left (c+d x^2\right )}{2 x^2}+\frac {1}{2} (b d) \text {Subst}\left (\int \frac {\cos (c+d x)}{x} \, dx,x,x^2\right )\\ &=-\frac {a}{2 x^2}-\frac {b \sin \left (c+d x^2\right )}{2 x^2}+\frac {1}{2} (b d \cos (c)) \text {Subst}\left (\int \frac {\cos (d x)}{x} \, dx,x,x^2\right )-\frac {1}{2} (b d \sin (c)) \text {Subst}\left (\int \frac {\sin (d x)}{x} \, dx,x,x^2\right )\\ &=-\frac {a}{2 x^2}+\frac {1}{2} b d \cos (c) \text {Ci}\left (d x^2\right )-\frac {b \sin \left (c+d x^2\right )}{2 x^2}-\frac {1}{2} b d \sin (c) \text {Si}\left (d x^2\right )\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.05, size = 48, normalized size = 0.91 \begin {gather*} -\frac {a-b d x^2 \cos (c) \text {Ci}\left (d x^2\right )+b \sin \left (c+d x^2\right )+b d x^2 \sin (c) \text {Si}\left (d x^2\right )}{2 x^2} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.04, size = 47, normalized size = 0.89
method | result | size |
default | \(-\frac {a}{2 x^{2}}+b \left (-\frac {\sin \left (d \,x^{2}+c \right )}{2 x^{2}}+d \left (\frac {\cos \left (c \right ) \cosineIntegral \left (d \,x^{2}\right )}{2}-\frac {\sin \left (c \right ) \sinIntegral \left (d \,x^{2}\right )}{2}\right )\right )\) | \(47\) |
risch | \(-\frac {b d \expIntegral \left (1, -i d \,x^{2}\right ) {\mathrm e}^{i c}}{4}+\frac {i \pi \,\mathrm {csgn}\left (d \,x^{2}\right ) {\mathrm e}^{-i c} b d}{4}-\frac {i \sinIntegral \left (d \,x^{2}\right ) {\mathrm e}^{-i c} b d}{2}-\frac {\expIntegral \left (1, -i d \,x^{2}\right ) {\mathrm e}^{-i c} b d}{4}-\frac {a}{2 x^{2}}-\frac {b \sin \left (d \,x^{2}+c \right )}{2 x^{2}}\) | \(91\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [C] Result contains complex when optimal does not.
time = 0.36, size = 57, normalized size = 1.08 \begin {gather*} \frac {1}{4} \, {\left ({\left (\Gamma \left (-1, i \, d x^{2}\right ) + \Gamma \left (-1, -i \, d x^{2}\right )\right )} \cos \left (c\right ) - {\left (i \, \Gamma \left (-1, i \, d x^{2}\right ) - i \, \Gamma \left (-1, -i \, d x^{2}\right )\right )} \sin \left (c\right )\right )} b d - \frac {a}{2 \, x^{2}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.35, size = 65, normalized size = 1.23 \begin {gather*} -\frac {2 \, b d x^{2} \sin \left (c\right ) \operatorname {Si}\left (d x^{2}\right ) - {\left (b d x^{2} \operatorname {Ci}\left (d x^{2}\right ) + b d x^{2} \operatorname {Ci}\left (-d x^{2}\right )\right )} \cos \left (c\right ) + 2 \, b \sin \left (d x^{2} + c\right ) + 2 \, a}{4 \, x^{2}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {a + b \sin {\left (c + d x^{2} \right )}}{x^{3}}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 99 vs.
\(2 (45) = 90\).
time = 4.93, size = 99, normalized size = 1.87 \begin {gather*} \frac {{\left (d x^{2} + c\right )} b d^{2} \cos \left (c\right ) \operatorname {Ci}\left (d x^{2}\right ) - b c d^{2} \cos \left (c\right ) \operatorname {Ci}\left (d x^{2}\right ) - {\left (d x^{2} + c\right )} b d^{2} \sin \left (c\right ) \operatorname {Si}\left (d x^{2}\right ) + b c d^{2} \sin \left (c\right ) \operatorname {Si}\left (d x^{2}\right ) - b d^{2} \sin \left (d x^{2} + c\right ) - a d^{2}}{2 \, d^{2} x^{2}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.02 \begin {gather*} \int \frac {a+b\,\sin \left (d\,x^2+c\right )}{x^3} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________